package com.lm.jasypt.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;


@RestController
@RequestMapping("/demo")
public class DemoController {

    @Value("${spring.datasource.druid.password}")
    private String password;

    @RequestMapping("/password")
    public Map<String, Object> showPassword(){
        Map<String, Object> map = new HashMap<>();
        map.put("msg", "HelloWorld");
        map.put("username", password);
        return map;
    }
}
